// RobotCollisionDetection.cpp : main project file.

#include "stdafx.h"
#include "Form1.h"
#include "TcpConnection.h"

using namespace RobotCollisionDetection;
using namespace System::Threading;

[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
	// Enabling Windows XP visual effects before any controls are created
	Application::EnableVisualStyles();
	Application::SetCompatibleTextRenderingDefault(false); 

	// initialize Tcp Thread
	TcpConnection::tcpThread = gcnew Thread(gcnew ParameterizedThreadStart(&TcpConnection::Listen));
	array<Object ^>^ params = gcnew array<Object^>(2);
	params[0]="127.0.0.1";
	params[1]=13000;
	TcpConnection::tcpThread->Start(params);

	// Create the main window and run it
	Application::Run(gcnew Form1());
	return 0;
}
